#include "Animation.h"
//we have some basic animation but it is not used yet
Animation::Animation(void)
{
}
Animation::Animation(char** fileNames, int amount)
{
	step = 0;
	sprites = amount;
	animation = new HANDLE[amount];
	for(int i = 0; i < amount; i++){
		animation[i] = LoadImage(NULL, fileNames[i], IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
	}

}

Animation::~Animation(void)
{
}


void Animation::increaseStep(){
	step++;
	if(step >= sprites){
		step = 0;
	}
}
void Animation::draw(HDC buffer, int x, int y, int width, int height){
	RenderHelper::RenderBitmap(buffer, animation[step], x, y, width, height);
	increaseStep();
}

